Ext.define('Admin.view.log.LogGridPanel', {
    extend: 'Ext.grid.Panel',
    xtype: 'logGridPanel',
    id:'logGridPanel',
      
    requires: [
      //'Ext.grid.column.RowNumberer',
      'Ext.selection.CheckboxModel'
    ],
    title: '用户列表',
    //store: Ext.data.StoreManager.lookup('simpsonsStore'),
  bind: '{logDataList}',
   listeners: {
        //celldblclick : 'openEmployeeWindow',
        itemmouseenter:'remarksTip'
    },
  selModel: {
    selType: 'checkboxmodel',
        checkOnly: true,
        showHeaderCheckbox: true
    },
    //multiSelect: true,
     dockedItems: [{
        xtype: 'toolbar',
        items: [{
          xtype: 'combobox',
          fieldLabel: '',
          name: 'searchFieldName',
          reference:'searchFieldName',
          store: {
              proxy: {
                  type: 'memory',
                  reader: 'array'
              },
              fields: [ 'key', 'value'],
              data: [
                  ['日志内容', 'content'],
                  ['操作', 'remarks']
              ]
          },
          queryMode: 'local',
          displayField: 'key',
          valueField: 'value',
          value:'请选择',
          allowBlank: false,
            editable:false
      },'-',{
            xtype: 'textfield',
            name:'searchFieldValue',
            reference:'searchFieldValue'
        },'-',{
        xtype: 'datefield',
        fieldLabel: '起始时间',
        name:'startTime',
        format: 'Y/m/d H:i:s',
        reference: 'logSearchStartTime'
    },'-',{
        xtype: 'datefield',
        fieldLabel: '结束时间',
        name:'endTime',
        format: 'Y/m/d H:i:s',
        reference: 'logSearchEndTime'
    },'-',{
            text:'查询',
            tooltip:'查询',
            iconCls:'x-fa fa-search',
            handler : 'search'
        }]
    }],
    columns: [      
     { header: 'ID',  dataIndex: 'logId',hidden:true ,width: 120},
         { header: '日志内容',  dataIndex: 'content' ,width: 300},
         { header: '操作',  dataIndex: 'remarks' ,width: 400},
          { header: '操作类型',  dataIndex: 'operationType' ,width: 120},
         { header: '时间', dataIndex: 'createdate', flex: 1 ,sortable: false,renderer: Ext.util.Format.dateRenderer('Y/m/d H:i:s')}],
         columnLines: true,
     bbar: {
      xtype: 'pagingtoolbar',//注意以后MVVM中使用新写法,不要使用Ext.create()
        //store: Ext.data.StoreManager.lookup('simpsonsStore'),
        bind: '{logDataList}',
        displayInfo: true,
        displayMsg: 'Displaying topics {0} - {1} of {2}',
        emptyMsg: "No topics to display",
        items:[]
    }
});